type Seperator1 = ':' | '.' | '/';
type Num11 = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
type Num12 = Num11 | 0
type ZeroToFive = 0 | 1 | 2 | 3 | 4 | 5
type HH = `0${Num12}` | `1${Num12}` | `2${0 | 1 | 2 | 3}`;
type hh = `0${Num12}` | `1${0 | 1 | 2}`;
type MM_SS = `${ZeroToFive}${Num12}`

type GenStr1<Type extends string> =
  Type extends 'HH' ? HH :
  Type extends 'hh' ? hh :
  Type extends ('MM' | 'SS') ? MM_SS : never;
type FormatTime<Pattern extends string> =
  Pattern extends `${infer hh}${Seperator1}${infer mm}${Seperator1}${infer ss}` ?
  Pattern extends `${hh}${infer seq1}${mm}${infer seq2}${ss}` ?
  `${GenStr1<hh>}${seq1}${GenStr1<mm>}${seq2}${GenStr1<ss>}` : never : never
const ft: FormatTime<'HH:MM:SS'> = '23:59:51'
const ft2: FormatTime<'hh:MM:SS'> = '00:59:59'
